package menu;

/**
 * @author: Alexander Martyushov
 */
public class DinerMenu {

    static final int MAX_ITEMS = 6;
    int numberOfItems = 0;
    MenuItem[] menuItems;

/*
    public MenuItem[] getMenuItems() {
        return menuItems;
    }
*/
    public Iterator createIterator(){
        return new DinerMenuIterator(menuItems);
    }

    public DinerMenu(){
        menuItems = new MenuItem[MAX_ITEMS];

        addItem("vege BLT", "beckon with", true, 2.94);
    }






    public void addItem(String name, String description, boolean vegetarian,double price){
        MenuItem menuItem = new MenuItem(name, description, vegetarian, price);
        if (numberOfItems>=MAX_ITEMS){
            System.err.println("sorry");
        } else {
            menuItems[numberOfItems] = menuItem;
            numberOfItems += 1;
        }
    }

}
